package com.kingint.mbg.ser.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.List;

import com.kingint.mbg.bas.entity.BasServiceClass;
import com.kingint.mbg.group.Insert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 服务工单表
 * </p>
 *
 * @author wxh
 * @since 2020-12-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SerServiceOrder对象", description="服务工单表")
public class SerServiceOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "对应总单的id")
    @TableField("work_id")
    private Integer workId;

    @ApiModelProperty(value = "服务内容（对应bas_service_class集合json）")
    @TableField("service_class_content")
    private String serviceClassContent;

    @ApiModelProperty(value = "后台使用")
    @TableField(exist = false)
    private List<Integer> serviceClassId;

    @ApiModelProperty("处理人id")
    @TableField(exist = false)
    private Long handleUserId;

    /**
     * 对应服务内容集合
     */
    @TableField(exist = false)
    @NotEmpty(groups = {Insert.class},message = "服务内容不能为空")
    private List<BasServiceClass> serviceClassList;

    @TableField(exist = false)
    @NotNull(groups = {Integer.class},message = "酒店id不能为空")
    private Integer hotelId;

    @NotNull(groups = {Insert.class},message = "房间id不能为空")
    @TableField(exist = false)
    private Integer roomId;

    @ApiModelProperty("房间号")
    @TableField(exist = false)
    private String roomNum;

    @ApiModelProperty("处理人")
    @TableField(exist = false)
    private String handleName;

    @ApiModelProperty("工单号")
    @TableField(exist = false)
    private String orderSn;

    @ApiModelProperty(value = "是否抄送主管（0，不需要，1，需要）")
    @TableField("is_copy")
    private Integer isCopy;

    @ApiModelProperty(value = "备注")
    @TableField("note")
    private String note;

    @ApiModelProperty(value = "上传图片，url图片地址链接，逗号分隔")
    @TableField("img")
    private String img;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value = "状态(0,正常，1，删除）")
    @TableField("status")
    private Integer status;

    /**
     * 工单状态
     */
    @TableField(exist = false)
    private Integer orderStatus;


}
